//
//  ControllerManager.m
//  Menu
//
//  Created by trimad on 11-11-21.
//  Copyright 2011 Trimad Group. All rights reserved.
//

#import "ContextManager.h"

#import "CoverViewController.h"
#import "MenuViewController.h"
#import "Order.h"

@implementation ContextManager

@synthesize rootViewController;
@synthesize coverViewController;
@synthesize globalOption;
@synthesize initCategories;
@synthesize initPages;
@synthesize initOrder;

static ContextManager *_instance = nil;

+ (ContextManager *)getInstance {
	if (!_instance) {
		@synchronized(self) {
			if (!_instance) {
				_instance = [[ContextManager alloc] init];
			}
		}
	}
	return _instance;
}

- (UIInterfaceOrientation) getCurrentInterfaceOrientation {
	if (rootViewController != nil) {
		return rootViewController.interfaceOrientation;
	} else {
		return coverViewController.interfaceOrientation;
	}
}

- (void) dealloc {
	[super dealloc];
}


@end
